home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Graphics / TVPaint / Rexx / styx2.rx < prev    next >
Encoding:
Text File  |  1995-11-07  |  1.6 KB  |  128 lines

  1. /*    param none    */
  2.  
  3. options results
  4.  
  5. address 'rexx_TVPaint'
  6.  
  7.  
  8. /* Classic but always great...  Try also with a bigger pencil  */
  9. /* press on the + and - keys during the rexxprogram is runing */
  10.  
  11. /* reset 
  12.  
  13.     tv_UpdateUndo
  14.     tv_SetDrawMode    Color
  15.     tv_AliasOn
  16.     tv_StencilOff
  17.     tv_DensityOff
  18.     tv_CycleOff    
  19.     tv_AeroSpline 10 245
  20.     tv_AeroPower 10
  21.     tv_DensitySpline 255 50
  22.     tv_XMax
  23.     tv_YMax
  24.     tv_WrapX    0
  25.     tv_WrapY    0
  26.     tv_RangeV
  27.  
  28. */
  29.     tv_GetWidth
  30.     width=result-1
  31.  
  32.     tv_GetHeight
  33.     height=result-1
  34.  
  35.  
  36.     va=5
  37.     vb=6
  38.     vc=7
  39.     vd=5
  40.     ve=8
  41.     vf=7
  42.     a=random(0,width,time('S'))
  43.     b=random(0,height,time('S'))
  44.     c=random(0,width,time('S'))
  45.     d=random(0,height,time('S'))
  46.     e=random(0,width,time('S'))
  47.     f=random(0,height,time('S'))
  48.  
  49.     vt=11
  50.     t=random(0,300)
  51.  
  52.     r=random(0,255,time('S'))
  53.     g=random(0,255,time('S'))
  54.     blue=random(0,255,time('S'))
  55.     wr=5
  56.     wg=6
  57.     wb=4
  58.     do z=1 to 200
  59.         r=r+wr
  60.         if (r>255) | (r<0) then
  61.         do
  62.             wr=-wr
  63.             r=r+wr
  64.         end
  65.         g=g+wg
  66.         if (g>255) | (g<0) then
  67.         do
  68.             wg=-wg
  69.             g=g+wg
  70.         end
  71.         blue=blue+wb
  72.         if (blue>255) | (blue<0) then
  73.         do
  74.             wb=-wb
  75.             blue=blue+wb
  76.         end
  77.  
  78.         tv_SetApen r g blue 255
  79.  
  80.         a=a+va
  81.         if (a>width) | (a<0) then
  82.         do
  83.             va=-va
  84.             a=a+va
  85.         end
  86.         b=b+vb
  87.         if (b>height) | (b<0) then
  88.         do
  89.             vb=-vb
  90.             b=b+vb
  91.         end
  92.         c=c+vc
  93.         if (c>width) | (c<0) then
  94.         do
  95.             vc=-vc
  96.             c=c+vc
  97.         end
  98.         d=d+vd
  99.         if (d>height) | (d<0) then
  100.         do
  101.             vd=-vd
  102.             d=d+vd
  103.         end
  104.         e=e+ve
  105.         if (e>width) | (e<0) then
  106.         do
  107.             ve=-ve
  108.             e=e+ve
  109.         end
  110.         f=f+vf
  111.         if (f>height) | (f<0) then
  112.         do
  113.             vf=-vf
  114.             f=f+vf
  115.         end
  116.  
  117.         t=t+vt
  118.         if (t>300) | (t<-300) then
  119.         do
  120.             vt=-vt
  121.             t=t+vt
  122.         end
  123.  
  124.         tv_Tension t
  125.         tv_Spline a b c d e f
  126.         
  127.     end
  128.